<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>响应式</title>

</head>
<body>
    <div id="app">
        <h4>差值表达式</h4>
        <h4>{{ msg }}</h4>
        <h4>{{ count }}</h4>
        <h1>v-text</h1>
        <div v-text="msg"></div>
        <div>
            <h1>v-model</h1>
            <input v-model="msg" type="text">
            <input v-model="count" type="text">
        </div>
        <div>
            <h1>v-html</h1>
            <div v-html="vHtml"></div>
        </div>
        <div>
            <h1>v-on</h1>
            <div v-on:click="clickEvent">点击</div>
        </div>
    </div>
    <script src="./js/dep.js"></script>
    <script src="./js/watcher.js"></script>
    <script src="./js/compiler.js"></script>
    <script src="./js/observer.js"></script>
    <script src="./js/vue.js"></script>
    <script>
        const vm = new Vue({
            data: {
                msg: 'hello',
                count: 1,
                person: {
                    name: 'alvin'
                },
                vHtml: `<div>
                        <h4>v-html</h4>
                    </div>`
            },
            methods: {
                clickEvent() {
                    console.log('点击事件')
                }
            },
            el: '#app'
        })
    </script>
</body>
</html>